We require the caller to invoke load() at the moment to do most
things.
OstreeDeployment *
ostree_sysroot_get_booted_deployment (OstreeSysroot *self)
{
+ g_return_val_if_fail (self->loaded, NULL);
+
return self->booted_deployment;
}
GPtrArray *
ostree_sysroot_get_deployments (OstreeSysroot *self)
{
- GPtrArray *copy = g_ptr_array_new_with_free_func ((GDestroyNotify)g_object_unref);
+ GPtrArray *copy;
guint i;
+
+ g_return_val_if_fail (self->loaded, NULL);
+
+ copy = g_ptr_array_new_with_free_func ((GDestroyNotify)g_object_unref);
for (i = 0; i < self->deployments->len; i++)
g_ptr_array_add (copy, g_object_ref (self->deployments->pdata[i]));
return copy;